// routes/homeRoutes.js
import {
  getHomes,
  getHomeById,
  getCancel,
  concern,
  collect,
  getAllCollects,
  upDateHome,
} from "../controllers/collectController.js";
import Router from "koa-router";

const router = new Router({ prefix: "/api/collect" }); // 设置路由前缀

router.get("/count/:username", getHomes);
router.get("/:user", getHomeById);
router.post("/isConcern/:user", concern);
router.post("/collect/:user", collect);

router.post("/add/add", concern);
router.get("/delete/delete/:user", getCancel);
router.get("/all/all", getAllCollects);
router.post("/update/update", upDateHome);

export default router;
